home *** CD-ROM | disk | FTP | other *** search
/ Delphi 2.0 - Programmer's Utilities Power Pack / Delphi 2.0 Programmer's Utilities Power Pack.iso / s_to_z / sysfile / sysglb.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1996-09-15  |  3.5 KB  |  126 lines

  1. {=================================================
  2.  Program: SysFile.Exe
  3.  Version: 1.0
  4.  Module: SysGlb.pas
  5.  Author: Wayne Niddery
  6.  CopyRight ⌐ 1995 Wayne Niddery and WinWright
  7.  =================================================}
  8. unit SysGlb;
  9.  
  10. {SysGlb contains all the constants and lobal variables needed by
  11.  the other units.}
  12.  
  13. interface
  14.  
  15. uses
  16.   IniFiles;
  17.  
  18. const
  19.   {Help File constants (generated using ForeHelp)}
  20.   Adding_to_Auto_Open = 4;
  21.   Auto_list_Box = 9;
  22.   Contents = 0;
  23.   Drop_Button = 12;
  24.   File_List_Box = 8;
  25.   Help_Button = 13;
  26.   Options_Button = 11;
  27.   Overview = 1;
  28.   Selecting_a_file_to_Edit = 5;
  29.   sh_Tabs = 7;
  30.   Take_Button = 10;
  31.   the_first_time = 3;
  32.   The_Setup_Page = 6;
  33.   Using_SysFile = 2;
  34.   Removing_from_Auto_Open = 14;
  35.   Deleting_files = 15;
  36.   Adding_files_to_Protect = 16;
  37.   Drag_and_Drop_option = 19;
  38.   File_Page = 17;
  39.   Saving_Files = 18;
  40.   Options_Dialog = 20;
  41.   No_Prompt_Option = 21;
  42.   Protection_Dialog = 22;
  43.   Popup_menus = 23;
  44.   Find_and_Replace = 24;
  45.   Exit_from_SysFile = 25;
  46.   Prompt_Each_File_Option = 27;
  47.   Prompt_Once_Only_Option = 28;
  48.   Confirm_Deletes_Option = 30;
  49.   Just_Do_It_Delete_Option = 31;
  50.   Options_Dialog_OK_Button = 32;
  51.   Options_Dialog_About_Button = 35;
  52.   Deletes_not_Allowed_Option = 29;
  53.   Registration = 26;
  54.   Options_Dialog_Cancel_Button = 33;
  55.   Editing_a_File  = 34;
  56.  
  57. const
  58.   {Application defined message used to inform Form1 that the
  59.    delete option has changed}
  60.   DelOptChanged = 100;
  61.  
  62.   {These message constants are used when giving user option to
  63.    reboot system or restart Windows}
  64.   RestartMsg  = 'One or more initialization files have changed. ' +
  65.                 'Would you like to restart Windows at this time?';
  66.   ReBootMsg   = 'System may need to be rebooted in order for changes ' +
  67.                 'to files to take effect. Do you want to reboot now?';
  68.  
  69. const
  70.   {these are the default file names for protection}
  71.   AUTOEXEC     = 'AUTOEXEC.BAT';
  72.   CONFIG       = 'CONFIG.SYS';
  73.   WININI       = 'WIN.INI';
  74.   SYSTEMINI    = 'SYSTEM.INI';
  75.   PROTOCOLINI  = 'PROTOCOL.INI';
  76.   CONTROLINI   = 'CONTROL.INI';
  77.   PROGMANINI   = 'PROGMAN.INI';
  78.   SERIALNOINI  = 'SERIALNO.INI';
  79.   WINFILEINI   = 'WINFILE.INI';
  80.   SYSFILEINI   = 'SYSFILE.INI';
  81.  
  82.   {Default list of protected and auto-opened files.
  83.    SysFileIni MUST be last so we can deliberately leave it out
  84.    of the auto-open default startup}
  85.   DefProt: array [0..9] of string[12] = (
  86.     AutoExec, Config, WinIni, SystemIni, ProtocolIni,
  87.     ControlIni, ProgManIni, SerialNoIni, WinFileIni, SysFileIni);
  88.  
  89.   {these are the section names in our INI file}
  90.   iniProtect  = 'Protect';
  91.   iniOptions  = 'Options';
  92.   iniAutoOpen = 'AutoOpen';
  93.   iniPosition = 'Position';
  94.  
  95.   {These constants are used to store forms position and size
  96.    to SysFile's initialization file - SYSFILE.INI}
  97.   iniLeft   = 'Left';
  98.   iniTop    = 'Top';
  99.   iniWidth  = 'Width';
  100.   iniRight  = 'Right';
  101.   iniHeight = 'Height';
  102.   iniPage   = 'Page';
  103.   {Save option values correspond to position in SaveGroup}
  104.   opNoPrompt    = 0;
  105.   opPromptEach  = 1;
  106.   opPromptOnce  = 2;
  107.   {Delete option values correspond to position in DeleteGroup}
  108.   opNoDelete    = 0;
  109.   opConfirm     = 1;
  110.   opDoIt        = 2;
  111.  
  112.   {global string constants}
  113.   Slash: string = '\';
  114.   Root: string  = 'C:\';
  115.   IniFilter = '*.INI';
  116.  
  117. var
  118.   {Windows Directory is stored here on program startup}
  119.   WinDir: string[144];
  120.   {handles our own INI file}
  121.   SysIni: TIniFile;
  122.  
  123. implementation
  124.  
  125. end.
  126.